package studia.figlewicz.dao.ejb;

// Generated 2011-06-15 09:11:23 by Hibernate Tools 3.4.0.CR1

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Platnosci generated by hbm2java
 */
@Entity
@Table(name = "PLATNOSCI", schema = "MARCIN", uniqueConstraints = @UniqueConstraint(columnNames = {
		"IDNOGI", "TERMINPLATNOSCI" }))
public class Platnosci implements java.io.Serializable {

	private BigDecimal idplatnosci;
	private Nogiproste nogiproste;
	private String terminplatnosci;
	private String typplatnosci;
	private BigDecimal nominal;
	private BigDecimal prawdopodobienstwo;
	private BigDecimal wartoscwarunkowadolna;
	private BigDecimal wartoscwarunkowagorna;
	private Set<Wycenyplatnosci> wycenyplatnoscis = new HashSet<Wycenyplatnosci>(
			0);

	public Platnosci() {
	}

	public Platnosci(BigDecimal idplatnosci, Nogiproste nogiproste,
			String terminplatnosci) {
		this.idplatnosci = idplatnosci;
		this.nogiproste = nogiproste;
		this.terminplatnosci = terminplatnosci;
	}

	public Platnosci(BigDecimal idplatnosci, Nogiproste nogiproste,
			String terminplatnosci, String typplatnosci, BigDecimal nominal,
			BigDecimal prawdopodobienstwo, BigDecimal wartoscwarunkowadolna,
			BigDecimal wartoscwarunkowagorna,
			Set<Wycenyplatnosci> wycenyplatnoscis) {
		this.idplatnosci = idplatnosci;
		this.nogiproste = nogiproste;
		this.terminplatnosci = terminplatnosci;
		this.typplatnosci = typplatnosci;
		this.nominal = nominal;
		this.prawdopodobienstwo = prawdopodobienstwo;
		this.wartoscwarunkowadolna = wartoscwarunkowadolna;
		this.wartoscwarunkowagorna = wartoscwarunkowagorna;
		this.wycenyplatnoscis = wycenyplatnoscis;
	}

	@Id
	@Column(name = "IDPLATNOSCI", unique = true, nullable = false, precision = 22, scale = 0)
	public BigDecimal getIdplatnosci() {
		return this.idplatnosci;
	}

	public void setIdplatnosci(BigDecimal idplatnosci) {
		this.idplatnosci = idplatnosci;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "IDNOGI", nullable = false)
	public Nogiproste getNogiproste() {
		return this.nogiproste;
	}

	public void setNogiproste(Nogiproste nogiproste) {
		this.nogiproste = nogiproste;
	}

	@Column(name = "TERMINPLATNOSCI", nullable = false, length = 5)
	public String getTerminplatnosci() {
		return this.terminplatnosci;
	}

	public void setTerminplatnosci(String terminplatnosci) {
		this.terminplatnosci = terminplatnosci;
	}

	@Column(name = "TYPPLATNOSCI", length = 14)
	public String getTypplatnosci() {
		return this.typplatnosci;
	}

	public void setTypplatnosci(String typplatnosci) {
		this.typplatnosci = typplatnosci;
	}

	@Column(name = "NOMINAL", precision = 24, scale = 12)
	public BigDecimal getNominal() {
		return this.nominal;
	}

	public void setNominal(BigDecimal nominal) {
		this.nominal = nominal;
	}

	@Column(name = "PRAWDOPODOBIENSTWO", precision = 24, scale = 12)
	public BigDecimal getPrawdopodobienstwo() {
		return this.prawdopodobienstwo;
	}

	public void setPrawdopodobienstwo(BigDecimal prawdopodobienstwo) {
		this.prawdopodobienstwo = prawdopodobienstwo;
	}

	@Column(name = "WARTOSCWARUNKOWADOLNA", precision = 24, scale = 12)
	public BigDecimal getWartoscwarunkowadolna() {
		return this.wartoscwarunkowadolna;
	}

	public void setWartoscwarunkowadolna(BigDecimal wartoscwarunkowadolna) {
		this.wartoscwarunkowadolna = wartoscwarunkowadolna;
	}

	@Column(name = "WARTOSCWARUNKOWAGORNA", precision = 24, scale = 12)
	public BigDecimal getWartoscwarunkowagorna() {
		return this.wartoscwarunkowagorna;
	}

	public void setWartoscwarunkowagorna(BigDecimal wartoscwarunkowagorna) {
		this.wartoscwarunkowagorna = wartoscwarunkowagorna;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "platnosci")
	public Set<Wycenyplatnosci> getWycenyplatnoscis() {
		return this.wycenyplatnoscis;
	}

	public void setWycenyplatnoscis(Set<Wycenyplatnosci> wycenyplatnoscis) {
		this.wycenyplatnoscis = wycenyplatnoscis;
	}

}
